import { Injectable } from '@angular/core';
import { HOSTURL, PREFIX } from '../../../config';
import { RequestClientService } from '../../request-client.service';

@Injectable({
  providedIn: 'root'
})
export class InspectPropertySettingService {

  constructor(
    private requestClientService: RequestClientService
  ) { }
  // 新建/编辑 检查项/检查性质
  public async CreateOrModifyCheckItem(params) {
    const res = await this.requestClientService.post(HOSTURL + `/api/services/${PREFIX}/SecurityChecks/CreateOrModifyCheckItem`, params);
    return res;
  }
  // 批量删除 检查项/检查性质 Type：1检查项、2检查性质
  public async BatchRemoveCheckItem(params) {
    const res = await this.requestClientService.post(HOSTURL + `/api/services/${PREFIX}/SecurityChecks/BatchRemoveCheckItem`, params);
    return res;
  }
  // 获取检查项集合 Type：1检查项、2检查性质
  public async QueryCheckItems(params) {
    const res = await this.requestClientService.post(HOSTURL + `/api/services/${PREFIX}/SecurityChecks/QueryCheckItems`, params);
    return res;
  }
}
